package com.example.neusoftfood_828lhl.model;

import com.example.neusoftfood_828lhl.common.Constants;
import com.example.neusoftfood_828lhl.listener.RetrofitListener;
import com.example.neusoftfood_828lhl.service.UserService;



import retrofit2.Call;

public class UserModel extends RetrofitBaseModel{
    private UserService userService;
    public UserModel() {
        this.userService = retrofit.create(UserService.class);
    }
    public void userLogin(String username, String password, final RetrofitListener listener) {
        Call call = userService.login(username, password);
        bindCallback(call ,listener,Constants.USERLOGIN);
    }
    public void register(String username, String userpass, String mobilenum,
                         String address, String comment, final RetrofitListener listener) {
        Call call = userService.register(username, userpass, mobilenum, address, comment);
        bindCallback(call ,listener,Constants.USEREGISTER);
    }
}

